﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using JBeamLibrary.Types;

namespace JBeamLibrary.VehicleParts.Elements
{
    public class Camera
    {
        #region Constants

        public static readonly Camera DefaultCamera = new Camera(6f, 4f, new Float3(0f, 0.5f, 0.75f), 65f);

        #endregion

        #region Properties

        public float Distance { get; set; }

        public float DistanceMin { get; set; }

        public Float3 Offset { get; set; }

        public float FOV { get; set; }

        public bool IsDefined
        {
            get
            {
                return
                    Distance > float.MinValue ||
                    DistanceMin > float.MinValue ||
                    Offset.IsValid ||
                    FOV > float.MinValue;
            }
        }

        #endregion

        #region CTORs

        public Camera()
        {
            Distance = float.MinValue;
            DistanceMin = float.MinValue;
            Offset = Float3.Invalid;
            FOV = float.MinValue;
        }

        public Camera(float distance, float distanceMin, Float3 offset, float fov)
        {
            Distance = distance;
            DistanceMin = distanceMin;
            Offset = offset;
            FOV = fov;
        }

        #endregion
    }
}
